# xev(1) completion                                        -*- shell-script -*-

_comp_cmd_xev()
{
    local cur prev words cword
    _init_completion || return

    case $prev in
        -display | -geometry | -bw | -id | -name)
            return
            ;;
        -bs)
            COMPREPLY=($(compgen -W 'NotUseful WhenMapped Always' -- "$cur"))
            return
            ;;
        -event)
            COMPREPLY=($(
                compgen -W '
                    keyboard mouse expose visibility structure substructure
                    focus property colormap owner_grab_button randr button
                ' -- "$cur"
            ))
            return
            ;;
    esac

    if [[ $cur == -* ]]; then
        COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
        return
    fi
} &&
    complete -F _comp_cmd_xev xev

# ex: filetype=sh
